import request from "@/utils/request";

// 获取学生数据
export const studentAPI = () => {
  return request.get("/students");
};

/**
 * 删除学生
 * @returns
 */
export const delStudentAPI = (id) => {
  request.delete(`/students/${id}`);
};

/**
 * 添加学生
 * @param {object} data
 */
export const addStudentAPI = (data) => {
  return request.post("/students", data);
};
